#include    "debug.h"

//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
DebugLog::DebugLog(const std::string &path, QObject *parent) : QObject (parent)
{
    log.open(path.c_str());
}

//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
DebugLog::~DebugLog()
{
    log.close();
}

//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
void DebugLog::DebugPring(double t, const state_vector_t &Y)
{
    log << t << " ";

    for (auto it = Y.begin(); it != Y.end(); ++it)
    {
        log << *it << " ";
    }

    log << std::endl;
}
